package com.xingkeduo.model.param;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang.StringUtils;

import com.xingkeduo.model.param.common.BaseParam;

public class MarketingReceiveHistoryParam extends BaseParam {
    /** */
    private Long id;

    /** 卡卷id*/
    private Long marketingId;

    /** 券包领取记录ID（券包领取时赋值）*/
    private Long marketingBagReceiveHistoryId;
    
    /** 领取编号*/
    private String receiveNo;

    /** 类型 0 券，1 卡，2 券包 ，记录中应没有券包记录*/
    private Integer marketingType;

    /** 券名称*/
    private String marketingName;

    /** 对应用户表id*/
    private Long userId;

    /** 发送代金券的微信用户id*/
    private Integer fromWechatId;

    /** 微信用户id*/
    private Integer wechatId;

    /** 服务类型 
优惠券
GENERAL_COUPON：优惠券， GIFT：兑换券， DISCOUNT：折扣券， CASH：代金券，  GROUPON：团购券 ，FIXED:一口价，FREE:免费券
FREQUENCY：服务次卡*/
    private String serviceType;

    /** 使用门槛*/
    private BigDecimal leastCost;

    /** 卷金额*/
    private BigDecimal couponAmount;

    /** 卡卷--可用开始时间*/
    private Date useStartTime;

    /** 卡卷--可用结束时间*/
    private Date useEndTime;

    /** 用户使用优惠券时间*/
    private Date useTime;

    /** 卡卷--创建时间/用户领取时间*/
    private Date createTime;

    /** 使用状态  0.初始 1.已领取 2.已使用 3.已作废 4 已过期，5已禁用，6退款失效*/
    private Integer status;

    /** 使用的订单号*/
    private String orderNo;

    /** 代金券发放领取类型： 1.网页领取 2.推送 3.老用户分享4.新用户下单反馈老用户，5扫码领取，6公众号领取，7手动发放 8邀请好友 9超时补偿 10 沉默唤醒 11 优惠包领取 12发型师发券 13美团点评，14口碑*/
    private Integer sendType;

    /** 领取店铺id，当用户领取方式为店铺扫码领取时赋值*/
    private Long storeId;
    
    /** 领取店铺名称*/
    private String storeName;

    /** 分享代金券的用户id*/
    private Long fromUserId;
    
    /** 分享的发型师ID*/
    private Long fromHairStyleId;

    /** */
    private String remark;
    
    private String redeemCode;

    /** 结算金额*/
    private BigDecimal settlementPrice;

    /** 优惠时间段*/
    private String weekHourIds;
    
    private String marketingInfo;
    
    private String userInfo;
    
    private String receiveStartTime;
    
    private String receiveEndTime;
    
    private Integer couponBagType;
    
    public Integer getCouponBagType() {
		return couponBagType;
	}

	public void setCouponBagType(Integer couponBagType) {
		this.couponBagType = couponBagType;
	}

	public String getReceiveStartTime() {
		return receiveStartTime;
	}

	public void setReceiveStartTime(String receiveStartTime) {
		this.receiveStartTime = receiveStartTime;
	}

	public String getReceiveEndTime() {
		return receiveEndTime;
	}

	public void setReceiveEndTime(String receiveEndTime) {
		this.receiveEndTime = receiveEndTime;
	}

	public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMarketingId() {
        return marketingId;
    }

    public void setMarketingId(Long marketingId) {
        this.marketingId = marketingId;
    }

    public String getReceiveNo() {
        return receiveNo;
    }

    public void setReceiveNo(String receiveNo) {
        this.receiveNo = receiveNo == null ? null : receiveNo.trim();
    }

    public Integer getMarketingType() {
        return marketingType;
    }

    public void setMarketingType(Integer marketingType) {
        this.marketingType = marketingType;
    }

    public String getMarketingName() {
        return marketingName;
    }

    public void setMarketingName(String marketingName) {
        this.marketingName = marketingName == null ? null : marketingName.trim();
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getFromWechatId() {
        return fromWechatId;
    }

    public void setFromWechatId(Integer fromWechatId) {
        this.fromWechatId = fromWechatId;
    }

    public Integer getWechatId() {
        return wechatId;
    }

    public void setWechatId(Integer wechatId) {
        this.wechatId = wechatId;
    }

    public String getServiceType() {
        return serviceType;
    }

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType == null ? null : serviceType.trim();
    }

    public BigDecimal getLeastCost() {
        return leastCost;
    }

    public void setLeastCost(BigDecimal leastCost) {
        this.leastCost = leastCost;
    }

    public BigDecimal getCouponAmount() {
        return couponAmount;
    }

    public void setCouponAmount(BigDecimal couponAmount) {
        this.couponAmount = couponAmount;
    }

    public Date getUseStartTime() {
        return useStartTime;
    }

    public void setUseStartTime(Date useStartTime) {
        this.useStartTime = useStartTime;
    }

    public Date getUseEndTime() {
        return useEndTime;
    }

    public void setUseEndTime(Date useEndTime) {
        this.useEndTime = useEndTime;
    }

    public Date getUseTime() {
        return useTime;
    }

    public void setUseTime(Date useTime) {
        this.useTime = useTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo == null ? null : orderNo.trim();
    }

    public Integer getSendType() {
        return sendType;
    }

    public void setSendType(Integer sendType) {
        this.sendType = sendType;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public String getStoreName() {
		return storeName;
	}

	public void setStoreName(String storeName) {
		this.storeName = storeName;
	}

	public Long getFromUserId() {
        return fromUserId;
    }

    public void setFromUserId(Long fromUserId) {
        this.fromUserId = fromUserId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public BigDecimal getSettlementPrice() {
        return settlementPrice;
    }

    public void setSettlementPrice(BigDecimal settlementPrice) {
        this.settlementPrice = settlementPrice;
    }

    public String getWeekHourIds() {
        return weekHourIds;
    }

    public void setWeekHourIds(String weekHourIds) {
        this.weekHourIds = weekHourIds == null ? null : weekHourIds.trim();
    }
    
    public String getMarketingInfo() {
		return marketingInfo;
	}

	public void setMarketingInfo(String marketingInfo) {
		this.marketingInfo = marketingInfo;
	}

	public String getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(String userInfo) {
		this.userInfo = userInfo;
	}

	public String getRedeemCode() {
		return redeemCode;
	}

	public void setRedeemCode(String redeemCode) {
		this.redeemCode = redeemCode;
	}

	public Long getMarketingBagReceiveHistoryId() {
		return marketingBagReceiveHistoryId;
	}

	public void setMarketingBagReceiveHistoryId(Long marketingBagReceiveHistoryId) {
		this.marketingBagReceiveHistoryId = marketingBagReceiveHistoryId;
	}

	public Long getFromHairStyleId() {
		return fromHairStyleId;
	}

	public void setFromHairStyleId(Long fromHairStyleId) {
		this.fromHairStyleId = fromHairStyleId;
	}



	public static enum MarketingReceiveStatusEnum {
		// 卡卷领取状态--0.初始 1.已领取/可使用 2.已使用 3.已作废 4 已过期，5已禁用，6退款失效*/
		UNKNOWN("UNKNOWN", "未知", -1), // 未知；
		INIT("INIT", "初始", 0), AVAILABLE("AVAILABLE", "可使用", 1), USED("USED", "已使用", 2), INVALID("INVALID", "已作废", 3),
		EXPIRED("EXPIRED", "已过期", 4), DISABLED("DISABLED", "已禁用", 5), REFUND_INVALID("REFUND_INVALID", "退款无效", 6),
		UNAVAILABLE("UNAVAILABLE", "不可用", 7);

		private String statusType;
		private String desc;
		private int code;

		public String getStatusType() {
			return statusType;
		}

		public void setStatusType(String statusType) {
			this.statusType = statusType;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}

		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}

		private MarketingReceiveStatusEnum(String statusType, String desc, int code) {
			this.statusType = statusType;
			this.desc = desc;
			this.code = code;
		}

		public static MarketingReceiveStatusEnum parse(String statusType) {
			if(StringUtils.isBlank(statusType)) {
				return UNKNOWN;
			}
			for (MarketingReceiveStatusEnum marketingReceiveStatusEnum : values()) {
				if (statusType.equalsIgnoreCase(marketingReceiveStatusEnum.getStatusType())) {
					return marketingReceiveStatusEnum;
				}
			}
			return UNKNOWN;
		}

		public static MarketingReceiveStatusEnum parseStatus(Integer code) {
			if(code == null) {
				return UNKNOWN;
			}
			for (MarketingReceiveStatusEnum marketingReceiveStatusEnum : values()) {
				if (code == marketingReceiveStatusEnum.getCode()) {
					return marketingReceiveStatusEnum;
				}
			}
			return UNKNOWN;
		}

	}

	public static enum MarketingReceiveSendTypeEnum {
		// 卡卷领取状态--
		//1.网页领取 2.推送 3.老用户分享4.新用户下单反馈老用户，5扫码领取，6公众号领取，
		//7客服发放 8邀请好友 9超时补偿 10 沉默唤醒 11 优惠包领取 12发型师发券
		// 13 兑换码领取 14美团点评 15口碑 16 直接领取 17 支付后赠送 18 其他方式
		UNKNOWN("UNKNOWN", "未知", -1), 
		WEB_PAGE("WEB_PAGE", "网页领取", 1), PUSH("PUSH", "推送", 2), USER_SHARE("USER_SHARE", "用户分享", 3),
		CONSUME_GIFT("CONSUME_GIFT", "新用户下单反馈老用户", 4), SWEEP_CODE("SWEEP_CODE", "扫码领取", 5), 
		WECHAT_PUBLIC_NUMBER("WECHAT_PUBLIC_NUMBER", "公众号领取", 6),MANUAL("MANUAL", "客服发放", 7),
		INVITE("INVITE", "邀请好友", 8),OVERTIME("OVERTIME", "超时补偿", 9),
		SILENT_AWAKENING("SILENT_AWAKENING", "沉默唤醒", 10),COUPON_BAG("COUPON_BAG", "优惠包领取", 11),
		HAIRDRESSER("HAIRDRESSER", "发型师发券", 12),REDEEM_CODE("REDEEM_CODE", "兑换码领取", 13),MEI_TUAN("MEI_TUAN", "美团点评", 14),
		KOU_BEI("KOU_BEI", "口碑", 15),DIRECT_RECEIVE("DIRECT_RECEIVE", "直接领取", 16),PAY_GIVE("PAY_GIVE", "支付后赠送", 17),
		OTHER("OTHER", "其他方式", 18),HAIRDRESSER_SELL("HAIRDRESSER_SELL", "发型师售卖", 19);

		private String statusType;
		private String desc;
		private int code;

		public String getStatusType() {
			return statusType;
		}

		public void setStatusType(String statusType) {
			this.statusType = statusType;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}

		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}

		private MarketingReceiveSendTypeEnum(String statusType, String desc, int code) {
			this.statusType = statusType;
			this.desc = desc;
			this.code = code;
		}

		public static MarketingReceiveSendTypeEnum parse(String statusType) {
			for (MarketingReceiveSendTypeEnum marketingReceiveSendTypeEnum : values()) {
				if (statusType.equalsIgnoreCase(marketingReceiveSendTypeEnum.getStatusType())) {
					return marketingReceiveSendTypeEnum;
				}
			}
			return UNKNOWN;
		}

		public static MarketingReceiveSendTypeEnum parseStatus(int code) {
			for (MarketingReceiveSendTypeEnum marketingReceiveSendTypeEnum : values()) {
				if (code == marketingReceiveSendTypeEnum.getCode()) {
					return marketingReceiveSendTypeEnum;
				}
			}
			return UNKNOWN;
		}
	}
	public static enum AuthStatusEnum {
    	//0:未认证,1:已认证,2:已冻结,3已作废
    	UNKNOWN("UNKNOWN","未知",-1),//未知；
    	UNAUTHORIZED("UNAUTHORIZED","未认证",0),
    	AUTHENTICATED("AUTHENTICATED","已认证",1),
    	FROZEN("FROZEN","已冻结",2),
    	INVALID("INVALID","已作废",3);
    	
		
		private String statusType;
		private String desc;
		private int code;
		
		public String getStatusType() {
			return statusType;
		}

		public void setStatusType(String statusType) {
			this.statusType = statusType;
		}
		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
		
		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}
		
		private AuthStatusEnum(String statusType, String desc,int code) {
			this.statusType=statusType;
			this.desc = desc;
			this.code = code;
		}

		public static AuthStatusEnum parse(String statusType) {
			if(StringUtils.isBlank(statusType)) {
				return UNKNOWN;
			}
			for (AuthStatusEnum authStatusEnum : values()) {
				if (statusType.equalsIgnoreCase(authStatusEnum.getStatusType())) {
					return authStatusEnum;
				}
			}
			return UNKNOWN;
		}
		public static AuthStatusEnum parseStatus(int code) {
			for (AuthStatusEnum authStatusEnum : values()) {
				if (code==authStatusEnum.getCode()) {
					return authStatusEnum;
				}
			}
			return UNKNOWN;
		}

	}
	
}